﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class lottery : System.Web.UI.Page
{
    protected Model.LotteryAnnouncement ssq = null;
    protected string[] SSQList = null;
    protected string SSQblue = null;
    protected Model.LotteryAnnouncement dlt = null;
    protected string[] DLTList = null;
    protected string[] DLTblue = null;
    protected Model.LotteryAnnouncement fc = null;
    protected string[] fcList = null;
    protected Model.LotteryAnnouncement pls = null;
    protected string[] plsList = null;
    protected Model.LotteryAnnouncement plw = null;
    protected string[] plwList = null;
    protected Model.LotteryAnnouncement qxc = null;
    protected string[] qxcList = null;
    protected Model.LotteryAnnouncement qlc = null;
    protected string[] qlcList = null;
    protected string qlcblue = null;
    protected void Page_Load(object sender, EventArgs e)
    { 
        //双色球
        ssq = BLL.LotteryAnnouncement.Prv(1);
        if (ssq != null)
        {
            ////加密
            //BLL.Security.DES_Encode(SSQLottery.LotteryNo, BLL.CMember.DESKey);
            ////解密
            //string lotteryNo = BLL.Security.DES_Decode(SSQLottery.LotteryNo, BLL.CMember.DESKey);
            string[] ssqflaglist = ssq.LotteryNo.Split('+');
            SSQList = ssqflaglist[0].Split(',');
            SSQblue = ssqflaglist[1];
        }
        dlt = BLL.LotteryAnnouncement.Prv(2);
        if (dlt != null)
        {
            ////加密
            //BLL.Security.DES_Encode(SSQLottery.LotteryNo, BLL.CMember.DESKey);
            ////解密
            //string lotteryNo = BLL.Security.DES_Decode(SSQLottery.LotteryNo, BLL.CMember.DESKey); 
            string[] ssqflaglist = dlt.LotteryNo.Split('+');
            DLTList = ssqflaglist[0].Split(',');
            DLTblue = ssqflaglist[1].Split(',');
        }
        fc = BLL.LotteryAnnouncement.Prv(5);
        if (fc != null)
        {
            ////加密
            //BLL.Security.DES_Encode(SSQLottery.LotteryNo, BLL.CMember.DESKey);
            ////解密
            //string lotteryNo = BLL.Security.DES_Decode(SSQLottery.LotteryNo, BLL.CMember.DESKey);  
            fcList = fc.LotteryNo.Split(',');
        }
        pls = BLL.LotteryAnnouncement.Prv(3);
        if (pls != null)
        {
            ////加密
            //BLL.Security.DES_Encode(SSQLottery.LotteryNo, BLL.CMember.DESKey);
            ////解密
            //string lotteryNo = BLL.Security.DES_Decode(SSQLottery.LotteryNo, BLL.CMember.DESKey);  
            plsList = pls.LotteryNo.Split(',');
        }
        plw = BLL.LotteryAnnouncement.Prv(4);
        if (plw != null)
        {
            ////加密
            //BLL.Security.DES_Encode(SSQLottery.LotteryNo, BLL.CMember.DESKey);
            ////解密
            //string lotteryNo = BLL.Security.DES_Decode(SSQLottery.LotteryNo, BLL.CMember.DESKey);  
            plwList = plw.LotteryNo.Split(',');
        }
        qxc = BLL.LotteryAnnouncement.Prv(6);
        if (qxc != null)
        {
            ////加密
            //BLL.Security.DES_Encode(SSQLottery.LotteryNo, BLL.CMember.DESKey);
            ////解密
            //string lotteryNo = BLL.Security.DES_Decode(SSQLottery.LotteryNo, BLL.CMember.DESKey);  
            qxcList = qxc.LotteryNo.Split(',');
        }
        qlc = BLL.LotteryAnnouncement.Prv(7);
        if (qlc != null)
        {
            ////加密
            //BLL.Security.DES_Encode(SSQLottery.LotteryNo, BLL.CMember.DESKey);
            ////解密
            //string lotteryNo = BLL.Security.DES_Decode(SSQLottery.LotteryNo, BLL.CMember.DESKey);
            string[] ssqflaglist = qlc.LotteryNo.Split('+');
            qlcList = ssqflaglist[0].Split(',');
            qlcblue = ssqflaglist[1];
        }
    }

    public string getWeek(DateTime time)
    {
        string weekstr = time.DayOfWeek.ToString();
        if (weekstr.Equals("Monday")) { weekstr = "周一"; }
        else if (weekstr.Equals("Tuesday")) { weekstr = "周二"; }
        else if (weekstr.Equals("Wednesday")) { weekstr = "周三"; }
        else if (weekstr.Equals("Thursday")) { weekstr = "周四"; }
        else if (weekstr.Equals("Friday")) { weekstr = "周五"; }
        else if (weekstr.Equals("Saturday")) { weekstr = "周六"; }
        else if (weekstr.Equals("Sunday")) { weekstr = "周日"; }
        return weekstr;
    }
}